import { request } from 'umi';
import type { TableListParams, TableListItem } from './data.d';

export async function currentUser(params?: TableListParams) {
  return request('/api/currentUser', {
    params,
  });
}

export async function allUsers(params?: TableListParams) {
  return request('/api/users', {
    params,
  });
}

export async function register(params?: TableListParams) {
  return request('/api/register', {
    method: 'POST',
    params,
  });
}


export async function closeUser(params?: TableListParams) {
  return request('/api/closeUser', {
    method: 'POST',
    params,
  });
}